# -*- coding: utf-8 -*-

###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc
import wx.grid


###########################################################################
## Class GridFrame
###########################################################################

class GridFrame(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString, pos=wx.DefaultPosition,
                          size=wx.Size(800, 450), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.Size(800, 450), wx.Size(800, 450))

        mainSizer = wx.BoxSizer(wx.VERTICAL)

        searchSizer = wx.GridBagSizer(0, 0)
        searchSizer.SetFlexibleDirection(wx.BOTH)
        searchSizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)
        searchSizer.SetEmptyCellSize(wx.Size(20, -1))

        self.m_text1 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(200, 30), 0)
        searchSizer.Add(self.m_text1, wx.GBPosition(0, 0), wx.GBSpan(1, 1), wx.ALL, 5)

        self.m_text2 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(200, 30), 0)
        searchSizer.Add(self.m_text2, wx.GBPosition(0, 1), wx.GBSpan(1, 1), wx.ALL, 5)

        self.m_button1 = wx.Button(self, wx.ID_ANY, u"搜 索", wx.DefaultPosition, wx.Size(-1, 30), 0)
        searchSizer.Add(self.m_button1, wx.GBPosition(0, 2), wx.GBSpan(1, 1), wx.ALL, 5)

        self.m_button2 = wx.Button(self, wx.ID_ANY, u"取 消", wx.DefaultPosition, wx.Size(-1, 30), 0)
        searchSizer.Add(self.m_button2, wx.GBPosition(0, 3), wx.GBSpan(1, 1), wx.ALL, 5)

        mainSizer.Add(searchSizer, 1, wx.FIXED_MINSIZE, 5)

        gridSizer = wx.BoxSizer(wx.VERTICAL)

        self.m_grid = wx.grid.Grid(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0)

        # Grid
        self.m_grid.CreateGrid(5, 5)
        self.m_grid.EnableEditing(True)
        self.m_grid.EnableGridLines(True)
        self.m_grid.EnableDragGridSize(False)
        self.m_grid.SetMargins(0, 0)

        # Columns
        self.m_grid.EnableDragColMove(False)
        self.m_grid.EnableDragColSize(True)
        self.m_grid.SetColLabelSize(30)
        self.m_grid.SetColLabelAlignment(wx.ALIGN_CENTER, wx.ALIGN_CENTER)

        # Rows
        self.m_grid.EnableDragRowSize(True)
        self.m_grid.SetRowLabelSize(80)
        self.m_grid.SetRowLabelAlignment(wx.ALIGN_CENTER, wx.ALIGN_CENTER)

        # Label Appearance

        # Cell Defaults
        self.m_grid.SetDefaultCellAlignment(wx.ALIGN_LEFT, wx.ALIGN_TOP)
        gridSizer.Add(self.m_grid, 0, wx.TOP, 5)

        mainSizer.Add(gridSizer, 1, wx.TOP, 5)

        self.SetSizer(mainSizer)
        self.Layout()
        self.m_menubar = wx.MenuBar(0)
        self.m_menu = wx.Menu()
        self.m_menuItem_open = wx.MenuItem(self.m_menu, wx.ID_ANY, u"打开", wx.EmptyString, wx.ITEM_NORMAL)
        self.m_menu.Append(self.m_menuItem_open)

        self.m_menubar.Append(self.m_menu, u"文件")

        self.SetMenuBar(self.m_menubar)

        self.m_statusBar = self.CreateStatusBar(1, wx.STB_SIZEGRIP, wx.ID_ANY)

        self.Centre(wx.BOTH)

    def __del__(self):
        pass
